package com.itheima.server;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;

/**
 * 由于实体类模块依赖mongo的启动器，mongodb的启动器默认要求你提供mongo的连接池参数，所以这里需要把mongodb自动装配对象与数据源对象排除在外
 */
@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})  //排除mongo的自动配置
@EnableCaching //开启springCache
@Slf4j
public class AppServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(AppServerApplication.class, args);
        log.info("=====AppServerApplication启动成功=====");
    }
}
